package com.npf.imgserver.common.enums;

import lombok.Data;

/**
 * Created with IDEA
 * 返回信息 枚举类
 * author: NiPengFei
 * Date:18/9/22
 * Time:下午10:52
 */
public enum ResultCodeEnum {

    SUCCESS("200", "成功"),
    CUSTOMER_IS_NULL("401","接入商信息为空,请重新传入"),
    IMG_INFO_IS_NULL("402","调用图片上传接口入参为空,请重新传入"),
    IMG_INFO_PARAM_DEFECT("403","调用图片上传接口缺少必传参数,请重新传入"),
    APP_KEY_ERROR("404","appKey错误"),
    CUSTOMER_LOCK_OR_DELETE("405","接入商禁用或已删除"),
    IMG_INFO_FORMATTING_ERROR("406","传入参数非图片文件转Base64编码,请校验后重新传入"),
    IMG_INFO_OVERSIZE("407","上传图片大小超限,请传入大小为4M(含4M)以下的图片"),
    RATE_LIMIT_WARN("408","限流预警,当前服务器繁忙,请稍后重试"),
    ERROR_SERVER("500", "服务器异常");

    private String code;

    private String message;

    private ResultCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
